<template>
  <tab-bar>
        <!-- 通过tab-bar-item替换slot插槽 -->
        <!-- props传递2个参数 path和activeColor -->
        <tab-bar-item path='/home' activeColor='deeppink'>
          <!-- 通过两个img和div替换具名插槽 -->
          <img slot="item-icon" src="../../assets/img/tabbar/home.svg" alt="">
          <img slot="item-icon-active" src="../../assets/img/tabbar/homeactive.svg" alt="">
          <div slot="item-text">首页</div>
        </tab-bar-item>
        <tab-bar-item path='/category' activeColor='deeppink'>
          <img slot="item-icon" src="../../assets/img/tabbar/category.svg" alt="">
          <img slot="item-icon-active" src="../../assets/img/tabbar/categoryactive.svg" alt="">
          <div slot="item-text">分类</div>
        </tab-bar-item>
        <tab-bar-item path='/shopcart' activeColor='deeppink'>
          <img slot="item-icon" src="../../assets/img/tabbar/shopcart.svg" alt="">
          <img slot="item-icon-active" src="../../assets/img/tabbar/shopcartactive.svg" alt="">
          <div slot="item-text">购物车</div>
        </tab-bar-item>
        <tab-bar-item path='/profile' activeColor='deeppink'>
          <img slot="item-icon" src="../..//assets/img/tabbar/profile.svg" alt="">
          <img slot="item-icon-active" src="../../assets/img/tabbar/profileactive.svg" alt="">
          <div slot="item-text">我的</div>
        </tab-bar-item>
      </tab-bar>
</template>

<script>
import TabBar from '../common/tabbar/TabBar.vue';
import TabBarItem from "../common/tabbar/TabBarItem.vue";

export default {
  name: 'App',
  components: {
    TabBar,
    TabBarItem
  }
}
</script>

<style>

</style>
